package top.yokey.shopnc.model;

import top.yokey.base.base.BaseHttpClient;
import top.yokey.base.base.BaseHttpListener;

import java.io.File;

@SuppressWarnings("ALL")
public class SnsAlbumModel {

    private final String ACT = "sns_album";
    private static volatile SnsAlbumModel instance;

    public static SnsAlbumModel get() {
        if (instance == null) {
            synchronized (SnsAlbumModel.class) {
                if (instance == null) {
                    instance = new SnsAlbumModel();
                }
            }
        }
        return instance;
    }

    public void fileUpload(File file, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "file_upload")
                .add("file", file)
                .post(baseHttpListener);

    }

}
